const baseUrl = 'http://111.230.48.39/gowhere';

const getToken = () => {
    return "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjA1MTVhMzg5LWY5NzgtNGM4Mi05OTAyLTVlOTFlMGIwYTJlNCJ9.i-MKBLeWeN3F2vcVQCrT_KRhYD1EKTzSW29FjEFTdo-DtfP1aNZaUVezKZaLP5flXmgGYonjyjqpSIFfI41Z2w"
}
const http = function (url, data) {
    return new Promise((resolve, reject) => {
        wx.request({
            header:{
                Authorization:getToken()
            },
            url: baseUrl + url,
            data: data,
            method: "POST",
            success: resolve,
            fail: reject
        })
    })
}

module.exports = {
    'http': http
}